# Copyright (c) 2018, the R8 project authors. Please see the AUTHORS file
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.

import os
import utils

ANDROID_L_API = '21'
BASE = os.path.join(utils.THIRD_PARTY, 'iosched_2019')

INPUT_JARS = [
    '1258593f0b2b739993b682bbaf9fbb78.jar',
    '89e9dbba1fbe6b0fb368f1e95589a721.jar',
    '1fc8941eba5f85af1a8b7da23c729ec1.jar',
    'ea69d715e74c5a1a5796f035243f3e97.jar',
    '811d2312b489a587d1581f4e37d637f7.jar',
    'core-common-2.1.0-beta01.jar',
    'annotations-4.6.1.jar',
    'okhttp-3.12.1.jar',
    'd55e0fc606c88c93df0d2c3ad9fbc66e.jar',
    'a88afc3d193dd0fa82c07cb40636e3ca.jar',
    '9a226aecc46543548aa3b8d516848199.jar',
    '57aa054ef470b0eef00e8fd0b0d634bc.jar',
    '04db891d0460d81f9bf27f14c75ab1c1.jar',
    'okhttp-2.7.5.jar',
    '66e02cfd6fc641b6806c903ab1385c8f.jar',
    '429150960927f98f31cfb8f93acce495.jar',
    'gson-2.8.1.jar',
    '9f174a718fccec6dd22216b50e2024dd.jar',
    'fccc983abc03ed47fb7f92e27c01f754.jar',
    'f682c9b637850b361f6987e36818df61.jar',
    'a2ff39bc73ca8ad09f4da1873bb0c86b.jar',
    '3e62317d1e8cb1c33d978124952bbdde.jar',
    '6d7cf1b5cfc5deefb39819e6927763d2.jar',
    '684e8bb7e37e94adea3de977d6b8d785.jar',
    '6da5a19a73b7295a9a14ebc739c15513.jar',
    'e8d3c32813b7956c025e0b94ef0f2d3f.jar',
    'annotations-4.1.1.4.jar',
    '19c2c18938ee2a99115dd700b18692c2.jar',
    '87ae4245c0a8fe0ba2dcd40275a203cf.jar',
    'databinding-common-3.4.1.jar',
    '27556a10d0fdbd9730a712a196a1ea33.jar',
    'kotlinx-coroutines-core-1.1.1.jar',
    'bdb2bd187f4ec8a364ebc58e0682bf5c.jar',
    '72054a54b7a1555355136f0f12550439.jar',
    'fd24a8a68ac1192744d79cb3f8a50bff.jar',
    'disklrucache-4.6.1.jar',
    'de1154a48df042b18af6f861738b1f4f.jar',
    '49d0c995b51f741d1cd5095ff50aa610.jar',
    '5a906c2026b29fcf8e38dfc091dedf5f.jar',
    'error_prone_annotations-2.3.2.jar',
    'fc3371678bf5b92c8ad09bff3cca7d34.jar',
    'b1328978c6137d4afd05e8b449089790.jar',
    '5d9bc74a14654749fec1bd3f57868314.jar',
    '4ca93957d039e88756ce172a3f23f92c.jar',
    'b3ae138529e3059714654ee61047c60c.jar',
    '04c45dab1f83131034d1e8ff7a7e4062.jar',
    '6d09c79fcadbf28f15bd5d302f1da434.jar',
    '3c5f06144063c91423d28cbd925d9a93.jar',
    'room-common-2.1.0.jar',
    'cc16ff10efeb6d0fb62ab09980fa6368.jar',
    '095c50fdef7bb1f16479501c204965c3.jar',
    '0f8cbd6ea38249489aa4b6e08f637a9c.jar',
    'dfba629a83faeb465bc5281f59b33410.jar',
    'kotlin-android-extensions-runtime-1.3.41.jar',
    '36e56f8acb47c47dc4aba993954571df.jar',
    'animal-sniffer-annotations-1.17.jar',
    '50262b47ca79a3e0887f4363cee3269a.jar',
    '653fd9ff51b91c8cb7e0b8b4933292e7.jar',
    'bd5cfb8566d0f18b7349220f77b99038.jar',
    'annotations-16.0.1.jar',
    'checker-compat-qual-2.5.2.jar',
    'fad1e20626a9c0638b081c19bc5b8a39.jar',
    '82e00b90bc477d17e9da6a4c8ff9ecea.jar',
    '67302edfd6d295aff1eb26c436372785.jar',
    'ce77a2a47382a2f825868572b889d2c7.jar',
    'javax.inject-1.jar',
    '96f7d3ab17962219c936737346db0f85.jar',
    'f3393d6b2b44cbf7b1344884834e89b0.jar',
    '54ffaad03867b0dadad722ce3fb9960b.jar',
    'grpc-api-1.21.0.jar',
    '91ed4f2ea5824596c9b228ad297f23b3.jar',
    '67a09a53395866b35f9cd93bd668c84e.jar',
    'e3d353a45188abc61dd104d69fa1dd82.jar',
    'jetified-kotlinx-coroutines-android-1.1.1.jar',
    '5ecec3c73e22ced41f9a40a26c0e5281.jar',
    '2771336e639c434ce717c9ac58875dc2.jar',
    'e9bfc218eb8cdc6f1110f0d048c4862d.jar',
    '38ace74613d265c1f1cccbb1fa10f627.jar',
    '562cc9d1cf74343dfb5fd7ced76ba2c4.jar',
    'opencensus-api-0.21.0.jar',
    'd337a2d970073e4d08c0afa5ad287a45.jar',
    '50ed6ac2559a57159d48c24be1ec847a.jar',
    'a3e463112f8c2d5d0e99f08c274e4df7.jar',
    'ae7980f49ccbaa525389f6b7e73240fe.jar',
    '8e0a68dd4e7fa4c84c2471cc6b46ad98.jar',
    '7072528e00796ef6011ab617dfdbed57.jar',
    '45c6fe8ab0e41a359c77e925bfe8a467.jar',
    'room-common-java8-2.1.0.jar',
    'fc5e4f8937eeeac973e266d99abdcbc9.jar',
    'lifecycle-common-2.1.0-beta01.jar',
    'guava-26.0-android.jar',
    'grpc-stub-1.21.0.jar',
    'jsr305-3.0.2.jar',
    '02941d2c97d179cc4a4187fbf269010b.jar',
    'grpc-okhttp-1.21.0.jar',
    '79b02b1828fc13f97dfd7c60656f58a3.jar',
    '97123a1bfa3e489812597dd9ca6a476f.jar',
    'c87d55c5aff3cfb40573462b40c16e93.jar',
    'd5d50e3f4be084f67aea3d7274996dac.jar',
    '22798eb6762e1b6e1ed68e0a26a11416.jar',
    'opencensus-contrib-grpc-metrics-0.21.0.jar',
    'e7d37c099e227a9a8063906d2d2fac39.jar',
    '58fa238dea0a0425db38a9ef7614544a.jar',
    '656d56b89a5bdfdb34c6df1a03cdb44a.jar',
    'cd4453bc1349dc354726f443d14e42a1.jar',
    'model.jar',
    '9b1a33316cb5646c0c7f2409b59a6e3e.jar',
    'ab21f6ad1b9d44aef2e4f748aadbd6e0.jar',
    'd84ac18db47f5c63a7c906981a8c74c2.jar',
    'auto-value-annotations-1.6.3.jar',
    'e14a0047c43e74969599da9eecd2c326.jar',
    'f12c26a7262a280545381f23a1e99fae.jar',
    'd69110fa9aef88987146fb1855fc797b.jar',
    '147569cf828c2f744bbbc06c0f207c31.jar',
    'grpc-protobuf-lite-1.21.0.jar',
    'da0774b870df803349a111b937795a71.jar',
    '2624862b1ed2676a15e6c4ecacdb2faa.jar',
    'grpc-context-1.21.0.jar',
    'logging-interceptor-3.10.0.jar',
    'threetenbp-1.3.6-no-tzdb.jar',
    '5b200d64a4850d02b6965e2bce869691.jar',
    '55ad080882c073b8ccc51a9c516ec407.jar',
    '1e61604b06dc10dcdd1cb9edab5f3411.jar',
    '6d74ce3d9ef226c95dd9e0589df9d8c0.jar',
    '1fdcde2b38692788ec8efcab3958b42c.jar',
    '50bef79f89b168cefcfbcad72f8cabfa.jar',
    'annotation-1.1.0.jar',
    '956e5331c88f28df168ce3ea2402dffc.jar',
    '471bc8aa5928f4fbb3c9f00cc6f907ca.jar',
    'dagger-2.24.jar',
    '234bdadd74c099896158187676ea0650.jar',
    'kotlin-stdlib-1.3.41.jar',
    'j2objc-annotations-1.1.jar',
    'fe2d5d6bd2084907c7dd971f366042e6.jar',
    '66fb157c1fdab977f2e15c1dcc222649.jar',
    '18ded358602e992e34f5131e231c9fdd.jar',
    'cb7e7d424e289578c115667747b262cd.jar',
    '0ed7d992c263060a704a951b53ac0bbb.jar',
    '6a495a5466b08b8e825e78918680b946.jar',
    '7c3656acf184f5103c65f49acad46981.jar',
    'classes_0.jar',
    '47bbfe33b04bd140773a33c708d5df34.jar',
    'grpc-core-1.21.0.jar',
    'collection-1.1.0.jar',
    'programclasses.jar',
    '592c92d42c935f46f0e50e988310a94b.jar',
    'constraintlayout-solver-1.1.3.jar',
    'protobuf-lite-3.0.1.jar',
    '309d47704a456783a746357a53f76ed9.jar',
    'kotlin-stdlib-jdk7-1.3.41.jar',
    'e47b3993e1f3cb81b6a13a44a60edc7d.jar',
    'classes.jar',
    'e9385c983e864be1243e1865c529f2ba.jar',
    'okio-1.15.0.jar',
    '492c0eca59ede4f2e0dd149bb44e0c5a.jar',
]

VERSIONS = {
  '2019': {
    'deploy' : {
      'inputs': [os.path.join(BASE, path) for path in INPUT_JARS],
      'pgconf': [os.path.join(BASE, 'proguard-rules.pro')],
      'libraries': [utils.get_android_jar(28)],
      'min-api' : ANDROID_L_API,
    },
  },
}

def GetLatestVersion():
  return '2019'

def GetName():
  return 'iosched'

def GetMemoryData(version):
  assert version == '2019'
  return {
      'find-xmx-min': 128,
      'find-xmx-max': 1024,
      'find-xmx-range': 16,
      # TODO(b/183371778): Figure out why the need to bump this.
      'oom-threshold': 329,
  }
